#!/user/bin/python3
# @Author:  LSY
# @Date:    2020/9/16

from app.models.bo.base_bo import BaseBO


class HanFanFuelTrackingBO(BaseBO):
    """
    含钒原燃料追踪参数
    """
    CG_LT_GL_GL04_Yuanranliao_ZBshao = None
    CG_LT_GL_GL04_Yuanranliao_ZBqiu = None
    CG_LT_GL_GL04_Yuanranliao_ZBkuai = None
    CG_LT_GL_GL04_Yuanranliao_ZBcokeWenfeng = None
    CG_LT_GL_GL04_Yuanranliao_ZBcoke1jiganxi = None
    CG_LT_GL_GL04_Yuanranliao_ZBcokeZhongluan2qiGan = None
    CG_LT_GL_GL04_Yuanranliao_ZBcokeZhongluan2qiShi = None
    CG_LT_GL_GL04_Yuanranliao_ZBcoke2jiganxi = None
    CG_LT_GL_GL04_Yuanranliao_ZBcoke2jijiao = None
    CG_LT_GL_GL04_Yuanranliao_ZBcoke2jijiaoDefeng = None
    CG_LT_GL_GL04_Yuanranliao_ZBcoke1jiDatuhe = None
    CG_LT_GL_GL04_Yuanranliao_ZBcokeDefeng = None
    CG_LT_GL_GL04_Yuanranliao_ZBcokePutong1jiDong = None
    CG_LT_GL_GL04_Yuanranliao_ZBcokeGengyanggaoliu = None
    CG_LT_GL_GL04_Yuanranliao_ZBcokeJiaoding = None
    CG_LT_GL_GL04_TQXZS = None  # 透气性指数
    CG_LT_GL_GL04_FYLL = None   # 富氧流量
    CG_LT_GL_GL04_ZXQL = None   # T阀座温度/T顶温
    CG_LT_GL_GL04_RFWD = None   # 热风温度
    CG_LT_GL_GL04_LFLL = None   # 冷风流量
    CG_LT_GL_GL04_FCokeRate = None  # 煤比
    CG_LT_GL_GL04_FCoalRate = None  # 焦比
    CG_LT_GL_GL04_XBYCZB = None  # 下部压差占比
    CG_LT_GL_GL04_SBYCZB = None  # 上部压差占比

    member_mapping_dict = {
        "CG_LT_GL_GL04_TQXZS": "透气性指数",
        "CG_LT_GL_GL04_FYLL": "富氧流量",
        "CG_LT_GL_GL04_ZXQL": "T阀座温度/T顶温",
        "CG_LT_GL_GL04_RFWD": "热风温度",
        "CG_LT_GL_GL04_LFLL": "冷风流量",
        "CG_LT_GL_GL04_FCokeRate": "煤比",
        "CG_LT_GL_GL04_FCoalRate": "焦比",
        "CG_LT_GL_GL04_XBYCZB": "下部压差占比",
        "CG_LT_GL_GL04_SBYCZB": "上部压差占比",
        "CG_LT_GL_GL04_Yuanranliao_ZBshao": "S_烧结矿总",
        "CG_LT_GL_GL04_Yuanranliao_ZBqiu":  "Q_球团矿总",
        "CG_LT_GL_GL04_Yuanranliao_ZBkuai": "K_块矿总",
        "CG_LT_GL_GL04_Yuanranliao_ZBcokeWenfeng": "J_文峰焦",
        "CG_LT_GL_GL04_Yuanranliao_ZBcoke1jiganxi": "J_一级干熄焦炭",
        "CG_LT_GL_GL04_Yuanranliao_ZBcokeZhongluan2qiGan": "J_中滦二期(干)",
        "CG_LT_GL_GL04_Yuanranliao_ZBcokeZhongluan2qiShi": "J_中滦二期(湿)",
        "CG_LT_GL_GL04_Yuanranliao_ZBcoke2jiganxi": "J_二级干熄焦",
        "CG_LT_GL_GL04_Yuanranliao_ZBcoke2jijiao": "J_二级焦",
        "CG_LT_GL_GL04_Yuanranliao_ZBcoke2jijiaoDefeng": "J_二级焦_德丰焦炭",
        "CG_LT_GL_GL04_Yuanranliao_ZBcoke1jiDatuhe": "J_大土河一级焦",
        "CG_LT_GL_GL04_Yuanranliao_ZBcokeDefeng": "J_德丰焦炭",
        "CG_LT_GL_GL04_Yuanranliao_ZBcokePutong1jiDong": "J_普通一级焦(东区)",
        "CG_LT_GL_GL04_Yuanranliao_ZBcokeGengyanggaoliu": "J_梗阳高硫焦",
        "CG_LT_GL_GL04_Yuanranliao_ZBcokeJiaoding": "J_焦丁",
    }

    ore_fuel_list = [
        "CG_LT_GL_GL04_Yuanranliao_ZBshao",
        "CG_LT_GL_GL04_Yuanranliao_ZBqiu",
        "CG_LT_GL_GL04_Yuanranliao_ZBkuai",
    ]

    coke_fuel_list = [
        "CG_LT_GL_GL04_Yuanranliao_ZBcokeWenfeng",
        "CG_LT_GL_GL04_Yuanranliao_ZBcoke1jiganxi",
        "CG_LT_GL_GL04_Yuanranliao_ZBcokeZhongluan2qiGan",
        "CG_LT_GL_GL04_Yuanranliao_ZBcokeZhongluan2qiShi",
        "CG_LT_GL_GL04_Yuanranliao_ZBcoke2jiganxi",
        "CG_LT_GL_GL04_Yuanranliao_ZBcoke2jijiao",
        "CG_LT_GL_GL04_Yuanranliao_ZBcoke2jijiaoDefeng",
        "CG_LT_GL_GL04_Yuanranliao_ZBcoke1jiDatuhe",
        "CG_LT_GL_GL04_Yuanranliao_ZBcokeDefeng",
        "CG_LT_GL_GL04_Yuanranliao_ZBcokePutong1jiDong",
        "CG_LT_GL_GL04_Yuanranliao_ZBcokeGengyanggaoliu",
        "CG_LT_GL_GL04_Yuanranliao_ZBcokeJiaoding",
    ]

    exclude_list = ['member_mapping_dict',
                    'exposed_ore_fuel_param_list',
                    'exposed_ore_fuel_param_dict',
                    'expose_coke_fuel_param_list',
                    'exposed_coke_fuel_param_dict',
                    'ore_fuel_list',
                    'coke_fuel_list',
                    'exclude_list']

    @classmethod
    def exposed_ore_fuel_param_list(cls):
        exclude_list = HanFanFuelTrackingBO.exclude_list

        return [i for i in cls.__dict__.keys()
                if i[:1] != '_' and i not in exclude_list and i in cls.ore_fuel_list]

    @classmethod
    def exposed_ore_fuel_param_dict(cls):
        exclude_list = HanFanFuelTrackingBO.exclude_list

        return {k: v for k, v in cls.member_mapping_dict.items()
                if k[:1] != '_' and k not in exclude_list and k in cls.ore_fuel_list}

    @classmethod
    def expose_coke_fuel_param_list(cls):
        exclude_list = HanFanFuelTrackingBO.exclude_list

        return [i for i in cls.__dict__.keys()
                if i[:1] != '_' and i not in exclude_list and i in cls.coke_fuel_list]

    @classmethod
    def exposed_coke_fuel_param_dict(cls):
        exclude_list = HanFanFuelTrackingBO.exclude_list

        return {k: v for k, v in cls.member_mapping_dict.items()
                if k[:1] != '_' and k not in exclude_list and k in cls.coke_fuel_list}
